package com.uziot.bucket.web;

import com.uziot.galaxy.dbtools.backup.ProcedureBackupDataTableCmp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shidt
 * @version V1.0
 * @className DataBackupController
 * @date 2019-12-08 02:32:53
 * @description
 */

@RestController
public class DataBackupController {

    @Autowired
    private ProcedureBackupDataTableCmp procedureBackupDataTableCmp;

    @GetMapping(value = "/backup/{id}")
    public String backup(@PathVariable String id) {
        procedureBackupDataTableCmp.executeBackup();
        return id;
    }
}
